Top 10k strings from HiSoft C v1.3 (1984)(HiSoft)(Side B).tzx in <root> / bin / z80 / software / Sinclair Spectrum Collection TOSEC.exe / Sinclair ZX Spectrum - Utilities & Educational / Sinclair ZX Spectrum - Utilities & Educational - [TZX] (TOSEC-v2007-01-01) /
Back to the directory listing
13 /*****************************/
8 char *s;
7 /* Standard Function Library */
7 /* Hisoft C */
6 char *s1, *s2;
6 --argv;
5 while (argc--)
5 argv = ¶m_byte_count + argc;
5 argc = param_byte_count/2 - 1;
3 int min(param_byte_count) auto
3 static int argc, *argv, min;
3 return max;
3 min = 32767;
3 if (*argv < min) min = *argv;
3 ++s;
2 unsigned reg_hl, reg_de, reg_bc;
2 typedef struct _header HEADER, * HEADER_PTR;
2 typedef int FILE;
2 struct _header
2 int max(param_byte_count) auto
2 extern unsigned strlen();
2 extern char *strcat(), *strncat(), *strcpy(), *strncpy(), *strchr(), *strrchr(),
2 char reg_a;
2 _setover(on)
2 _colour(h,i)
2 _beep(DE,HL)
2 HEADER _base, *_allocp;
2 /* Last changed 15 Aug 1985 */
2 /* Copyright (C) 1984 Hisoft */
2 /* Z80 register cache for inline code */
2 /* Two variadic arithmetic functions (see manual for details) */
2 /* Storage Allocation Structure and Variables */
2 /* Forward declarations for non-int library functions */
2 /* File system Structure */
2 /* End Header */
2 /* HEADER */
2 /* */
2 #define RL_L 0x15CB
2 #define RLA 0x17
2 #define PUSH_IY 0xE5FD
2 #define PUSH_IX 0xE5DD
2 #define PUSH_HL 0xE5
2 #define POP_IY 0xE1FD
2 #define POP_IX 0xE1DD
2 #define LD_L_A 0x6F
2 #define LD_IX_from 0x2ADD
2 #define LD_H_with 0x26
2 #define LD_HL_with 0x21
2 #define LD_HL_into 0x22
2 #define LD_HL_from 0x2A
2 #define LD_DE_with 0x11
2 #define LD_DE_into 0x53ED
2 #define LD_DE_from 0x5BED
2 #define LD_B_with 0x06
2 #define LD_BC_into 0x43ED
2 #define LD_BC_from 0x4BED
2 #define LD_A_with 0x3E
2 #define LD_A_into 0x32
2 #define LD_A_from 0x3A
2 #define JR_Z 0x28
2 #define JR_NC 0x30
2 #define JP_HL 0xE9
2 #define INC_B 0x04
2 #define EI 0xFB
2 #define DI 0xF3
2 #define CALL 0xCD
2 #define ADD_HL_DE 0x19
2 #define void int /* for functions which return no value */
2 #define _SAFETY 50 /* for
2 #define TRUE 1
2 #define NULL 0 /* for use with pointers */
2 #define FAST
2 #define FALSE 0 /* for Boolean operations */
2 #define ERROR -1
2 #define EOF -1 /* end of file value */
2 static de,hl;
2 return i;
2 putc(i,2);
2 putc(h,2);
2 printf("\025%c",on?0:1);
2 inline(0xdd,0xe5,
2 if (i<0 | i>7) return -1;
2 while (*s)
2 unsigned _size;
2 struct _header * _ptr;
2 static int c;
2 static int argc, *argv, max;
2 static char *p;
2 static char *cs;
2 return s1;
2 return s - s1;
2 return min;
2 max = -32767;
2 inline(0xCD,0xD6B);
2 for (i = 0; i < 4; ++i)
2 char *s, c;
2 char *a;
2 char *a, *b, *c;
2 FILE *fp;
2 if (*argv > max) max = *argv;
2 0xed,0x5b,&de,
2 0xdd,0xe1);
2 0xcd,0x3b5,
2 0x2a,&hl,
2 *strpbrk(), *calloc(), *malloc(), *sbrk(), *fgets(), *gets();
1 void srand(n)
1 void qsort(list, num_items, size, cmp_func)
1 void puts(s)
1 void poke(address, value)
1 void long_set(a, n, d)
1 void long_multiply(c, a, b)
1 void long_init(a, n1, n0)
1 void long_copy(c, a)
1 void long_add(c, a, b)
1 void free(block)
1 void fputs(s, fp)
1 unsigned strlen(s)
1 typedef char * __char_ptr;
1 stdio.lib
1 stdio.h
1 rgv > max) max = *argv;
1 py(dest, source)
1 plot(on,x,y)
1 ong_init(k, 0x41c6,0x4e6d);
1 line(on,dx,dy)
1 int toascii(c)
1 int strspn(s1, s2)
1 int strncmp(s1, s2, n)
1 int strcspn(s1, s2)
1 int strcmp(s, t)
1 int sign(n)
1 int rand()
1 int peek(address)
1 int out(data, port)
1 int isxdigit(c)
1 int ispunct(c)
1 int isprint(c)
1 int isgraph(c)
1 int iscntrl(c)
1 int isascii(c)
1 int isalnum(c)
1 int inp(port)
1 int atoi(s)
1 int abs(n)
1 char *strrchr(s, c)
1 char *strpbrk(s1, s2)
1 char *strncpy(s1, s2, n)
1 char *strncat(s1,
1 char *strchr(s, c)
1 char *strcat(base, add)
1 char *strc
1 char *sbrk(n)
1 char *malloc(num_bytes)
1 char *gets(s)
1 char *fgets(s, n, fp)
1 char *calloc(n, size)
1 char _rnum[4];
1 beep(duration,pitch)
1 _setover(on);
1 Created with Ramsoft MakeTZX
1 /****** FILE SYSTEM ******/
1 /*** System Interface ***/
1 /* now zero fill the store */
1 /* Spectrum Graphics and
1 /* Some arithmetic functions */
1 /* Last changed 31 Oct 1985 */
1 /* Copyright (C) 1985 Hisoft */
1 /* String Handling Functions */
1 /* Storage Allocation and Freeing (Heap Management) */
1 /* Sorting function - a Shell sort */
1 /* Some Functions for 32 bit integer arithmetic */
1 /* Pseudo-Random Number Generator */
1 /* NB - the common ones are built-in for efficiency */
1 /* Input and Output */
1 /* Format conversion routine - ASCII to binary integer */
1 /* Character Test and Manipulate Functions */
1 /* An illustration of how to grub around in the store */
1 /* version 1.3 */
1 /* End */
1 ) a[i] = 0;
1 (sy<<8)+sx;
1 ®_bc, /* ld bc,(reg_bc) */
1 #define HEAPSIZE 1000
1 while(c = *s++)putchar(c);
1 unsigned duration,pitch;
1 static sx,sy,de,bc;
1 static int c;
1 static ft;
1 return _colour(16,i);
1 return _colour
1 putchar('\n');
1 product, x);
1 pitch=pitch/10;
1 inline(0xed,0x5b,&de,
1 inline(0xdd,0x46,4,
1 inline(0xcd,25236);
1 if (dy<0)
1 if (dx<0)
1 if ( ! pitch)
1 ft=duration*pitch/10;
1 bc=(dy<<8)+dx;
1 _setover(on);
1 _exit(n);
1 _beep(ft,cast(unsigned)43750/pitch-30);
1 while (n-- && *s2) *s++ = *s2++;
1 while (n)
1 while (isspace(*s)) ++s;
1 while (isdigit(c = *s++)) value = 10 * value + c - '0';
1 while (c = *s++) putc(c, fp);
1 while (TRUE);
1 while (TRUE)
1 while (--n > 0 && (c = getc(fp)) != EOF)
1 while (*t++);
1 while (*s1 == *s2)
1 while (*s) ++s;
1 while (*s == *t)
1 while (*result++ = *source++) ;
1 while (*dest++ = *add++);
1 while (*dest) ++dest;
1 while ((c = getchar())
1 value = 0;
1 unsigned n;
1 unsigned n1,n0;
1 unsigned n, d;
1 unsigned n, size;
1 static unsigned u, i;
1 static unsigned gap, byte_gap, i;
1 static unsigned nbytes;
1 static int i;
1 static int i, j;
1 static int c, val
1 static int c;
1 static char x[4], product[4];
1 static char k[4];
1 static char *t;
1 static char *s;
1 static char *s, c;
1 static char *result;
1 static char *p,
1 static char *dest;
1 static HEADER *p, *q;
1 static HEADER *p, *q;
1 sign = 1;
1 s = NULL;
1 return s;
1 return ptr;
1 return p;
1 return p-s-1;
1 return dest;
1 return NULL;
1 return *s1 - *s2;
1 return *s - *t;
1 return ((c == EOF && cs == s) ? NULL : s);
1 return sign * value;
1 return n<0 ? -n : n ;
1 return n ?
1 return isprint(c) & ! isalnum(c);
1 return isdigit(c) | (c >= 'A' & c <= 'F');
1 return isalpha(c) | isdigit(c) ;
1 return c >= ' ' & c < '\177' ;
1 return c > ' ' & c < '\177' ;
1 return c < 0x80 ;
1 return c < ' ' | c == '\177' ;
1 return c & 0x7F;
1 return base;
1 return * cast(__char_ptr) address;
1 return ((_rnum[3] << 8) + _rnum[2]) & 0x7FFF;
1 result = dest;
1 reg_bc = port; reg_hl = data;
1 ptr = malloc(length = n * size);
1 p=heap_ptr;
1 p = q->_ptr;
1 p = cast(HEADER_PTR) block - 1;
1 nbytes = (num_bytes + (sizeof(HEADER) - 1)) / sizeof(HEADER) + 1;
1 move(ptr+1, ptr, length-1);
1 move(c, a, 4);
1 min and max are in "stdio.
1 long_set(product, 0,0);
1 long_multiply(_rnum, _rnum, k);
1 long_init(k, 0,0x3039);
1 long_init(_rnum, 0,n);
1 long_copy(c, product);
1 long_add(_rnum, _rnum, k);
1 int (*cmp_func)();
1 int num_items, size;
1 inline(0xe1,0xe1,0xe1,
1 if (q + q->_size == p)
1 if (p + p->_size == q->_ptr)
1 if (heap_ptr+n > heap+HEAPSIZE) return ERROR;
1 if (d < 3) a[d+1] = n >> 8;
1 if ((q = _allocp) == NULL) /* no free list */
1 if (!n) return 0;
1 if ( ! ptr) return NULL;
1 if ( ! num_bytes) return NULL;
1 if (*s == '-') { ++s; sign = -1; }
1 heap_ptr += n;
1 for(ft=0;ft<duration;++ft)
1 for (q = _allocp; !(p > q && p < q->_ptr); q = q->_ptr)
1 for (i=0; i<4; ++i
1 for (gap = num_items >> 1; gap > 0; gap >>= 1)
1 else if (*s == '+') ++s;
1 else q->_ptr = p;
1 else p->_ptr = q->_ptr;
1 do ; while (*p++);
1 do if (*t == c) s = t;
1 dest = base;
1 char *sbrk();
1 char *s, *t;
1 char *list;
1 char *dest, *source;
1 char *block;
1 char *base, *add;
1 char *a, *c;
1 c = toupper(c);
1 c = *s2;
1 byte_gap = gap * size;
1 because they are variadic
1 a[d] = n & 0xff;
1 a[3] = n1 >> 8;
1 a[2] = n1 & 0xff;
1 a[1] = n0 >> 8;
1 a[0] = n0 & 0xff;
1 _allocp = q;
1 FAST char length;
1 FAST char *ptr;
1 /* split block and allocate tail */
1 *s = NULL;
1 *ptr = 0;
1 *cs = 0;
1 *cs = '\0';
1 * cast(__char_ptr) address = value;
1 sy= 0xFF;
1 sx= 0xFF;
1 for(pitch=4630;++pitch;);
1 dy= -dy;
1 dx= -dx;
1 Sound Functions */
1 0x2b,0xc3,0x55,0);
1 ((c==-1 && cs==s) ?
1 } /* end while TRUE */
1 if (q >= q->_ptr && (p > q || p < q->_ptr)) break;
1 if ((*cs++ = c) == '\n') break;
1 heap[HEAPSIZE],
1 for (j = i; j >= 0; --j)
1 NULL : s );
1 Adapted from "Learning to Program in C" by Thomas Plum.
1 0xE5, /* push hl */
1 0xE1DD, /* pop ix */
1 0xE1, /* pop hl */
1 0xC9); /* ret */
1 0xC1, /* pop bc */
1 0x69ED); /* out (c),l */
1 0x68ED, /* in l,(c) */
1 0x4BED,
1 0x2A, ®_hl, /* ld hl,(reg_hl) */
1 0x26, 0, /* ld h,0 */
1 *heap_ptr=heap;
1 ( n<0 ? -1 : 1 ) : 0 ;
1 !=EOF && c!='\n')
1 p = p->_ptr;
1 u >>= 8;
1 u += *a++ + *b++;
1 q->_size += p->_size;
1 q->_ptr = p->
1 q = p;
1 p->_size += q->_ptr->_size;
1 p->_ptr = q->_ptr->_ptr;
1 if (strchr(s2, *s1)) return s1;
1 if (strchr(s2, *s)) break;
1 if (p->_size >= nbytes) /* big enough */
1 if (p == _allocp) /* wrapped around free list */
1 if (*s == c) return
1 if (! *s) return 0;
1 if ( ! strchr(s2, *s)) break;
1 if ( ! --n) break;
1 if ( ! *s1) return 0;
1 if ( ! *s) return NULL;
1 for (i = gap; i < num_items; ++i)
1 _base._size = 0;
1 _base._ptr = _allocp = q = &_base;
1 --n;
1 ++s; ++t;
1 ++s1; ++s2;
1 ++s1;
1 *s++ = ( c ? ( c = *s2++ ) : 0 ) ;
1 *cs++ = c;
1 *c++ = u & 0xff;
1 long_set(x, a[i-j] * b[j], i);
1 long_add(product,
1 for (p = list + i * size - byte_gap; p >= list; p -= byte_gap)
1 0xed,0x4b,&bc,
1 0xdd,0x4e,6,
1 0xcd,0x24ba);
1 0xcd,0x22e5);
1 }
1 {
1 return cast(__char_ptr) (p+1);
1 p->_size = nbytes;
1 p = _allocp;
1 if (p->_size == nbytes) q->_ptr = p->_ptr; /* just right size */
1 if ((p = cast(HEADER_PTR) sbrk(nbytes * sizeof(HEADER))) == ERROR)
1 free(p+1);
1 else
1 _allocp = q;
1 }
1 {
1 swap(p, p + byte_gap, size);
1 return NULL;
1 if ((*cmp_func)(p, p + byte_gap) <= 0) break;
1 p->_size -= nbytes;
1 p->_size = nbytes;
1 p += p->_size;